+2008-01-05 Christian Persch <chpe@gnome.org>
+
+ * tests/defaultvaluetest.c: Fix mem leak, and don't pass
+ GType as integer through gpointer. Bug #507395.
+
2008-01-04 Mathias Hasselmann <mathias@openismus.com>
Avoid some compiler warnings (#507000).
GParamSpec **pspecs;
guint n_pspecs, i;
GType type;
-
- type = GPOINTER_TO_INT (data);
-
+
+ type = * (GType *) data;
+
if (!G_TYPE_IS_CLASSED (type))
return;
check_property ("Property", pspec, &value);
g_value_unset (&value);
}
+ g_free (pspecs);
if (g_type_is_a (type, GTK_TYPE_WIDGET))
{
check_property ("Style property", pspec, &value);
g_value_unset (&value);
}
+
+ g_free (pspecs);
}
if (g_type_is_a (type, GDK_TYPE_WINDOW))
testname = g_strdup_printf ("/Default Values/%s",
g_type_name (otypes[i]));
g_test_add_data_func (testname,
- GINT_TO_POINTER (otypes[i]),
+ &otypes[i],
test_type);
g_free (testname);
}